﻿using com.nm.Attributes;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BaseAPI.model
{
   public class DeptData
    {
        /// <summary>
        /// 返回部门列表
        /// </summary>
        public class DeptListData : ModifyData
        {
            public List<DeptListData> Children { get; set; }
        }

        /// <summary>
        /// 编辑部门实体
        /// </summary>
        public class ModifyData : CreateData
        {
            [ParamDescription("部门ID")]
            public int DeptID { get; set; }
        }

        /// <summary>
        /// 部门列表实体
        /// </summary>
        public class CoreModel
        {
            [ParamDescription("公司代码")]
            public string CompanyID { get; set; }

            [ParamDescription("部门编码")]
            public string DeptCode { get; set; }

            [ParamDescription("部门名称")]
            public string DeptContent { get; set; }
        }

        public class CreateData: CoreModel
        {
            
            [JsonProperty(NullValueHandling = NullValueHandling.Include)]
            [ParamDescription("部门类型")]
            public int? Kind { get; set; }

            [ParamDescription("部门全称")]
            public string DeptName { get; set; }

            [JsonProperty(NullValueHandling = NullValueHandling.Include)]
            [ParamDescription("成本中心编码")]
            public string CostCode { get; set; }

            [JsonProperty(NullValueHandling = NullValueHandling.Include)]
            [ParamDescription("休息日套")]
            public int? Restsetid { get; set; }

            [JsonProperty(NullValueHandling = NullValueHandling.Include)]
            [ParamDescription("所属部门")]
            public string DepartMent { get; set; }

            [JsonProperty(NullValueHandling = NullValueHandling.Include)]
            [ParamDescription("店铺编号")]
            public string StoreCode { get; set; }

            [JsonProperty(NullValueHandling = NullValueHandling.Include)]
            [ParamDescription("店铺地址")]
            public string StoreAddr { get; set; }

            [JsonProperty(NullValueHandling = NullValueHandling.Include)]
            [ParamDescription("操作人")]
            public int operater { get; set; }

            [ParamDescription("父代码")]
            public string ParentCode { get; set; }

            [ParamDescription("级数")]
            public int Grade { get; set; }

            [ParamDescription("父级部门ID")]
            public int ParentID { get; set; }

            [JsonProperty(NullValueHandling = NullValueHandling.Include)]
            [ParamDescription("排序序号")]
            public int Sort { get; set; }
        }

    }
}
